﻿#region Header

// Majesty of Omega - The next evolution of macro management space strategy
// 
// Copyright 2007-2009 André Claaßen
// 
// This file is protected by the terms and conditions of the
// Microsoft Community License (Ms-CL 1.1), a copy of which should
// have been distributed along with this software. If not,
// you may find the license information at the following URL:
// 
// http://www.microsoft.com/resources/sharedsource/licensingbasics/communitylicense.mspx

#endregion

using Majesty_of_Omega.Model.Game;

namespace Majesty_of_Omega.Logic.GameConfiguration
{
    /// <summary>
    /// Business class for the setup phase of a new game.
    /// The game configurator creates a GameSettings structure.
    /// The SaveGame Settings structure is the feed for the GameCreator class
    /// </summary>
    public static class GameConfigurator
    {
        /// <summary>
        /// Helper class for the complex race customization process
        /// </summary>
        private static GameRaceConfigurator _gameRaceConfigurator;

        /// <summary>
        /// Game settings
        /// </summary>
        private static GameSettings _gameSettings;

        /// <summary>
        /// Constructs and sets the game settings to default (Humans)
        /// </summary>
        static GameConfigurator()
        {
            ResetSettings();
        }

        ///<summary>
        /// access to the game settings. 
        ///</summary>
        public static GameSettings GameSettings
        {
            get { return _gameSettings; }
        }

        /// <summary>
        /// Access to the Race Configurator sub class
        /// </summary>
        public static GameRaceConfigurator GameRaceConfigurator
        {
            get { return _gameRaceConfigurator; }
        }

        /// <summary>
        /// Resets the Game Settings to Default
        /// </summary>
        public static void ResetSettings()
        {
            _gameSettings = new GameSettings();
            _gameRaceConfigurator = new GameRaceConfigurator(_gameSettings);
        }
    }
}